define(function(){
    return function(res,goodsMsg,tbody){
        let str = "";
        res.data.forEach(val1=>{
          goodsMsg.forEach(val2=>{
            if(val1.goodsId == val2.id){
                str += `
                <div class="table-list1" index="${val2.id}">
                        <div class="list-checked">
                            <input class="checkone" type="checkbox" name="" ${val2.flag ? 'checked':''}>
                            <a href="javascript:viod(0);">
                                <img src="${val1.proImg}" alt="">
                            </a>
                        </div>
                        <div class="product-title">
                            <a href="javascript:viod(0);">
                                ${val1.proName}
                            </a>
                            <p>下一代手机，下一代电脑</p>
                        </div>
                        <div class="product-price">
                            <span>¥${val1.price}</span>
                        </div>
                        <div class="product-cout">
                            <div class="product-cout-content">
                                    <button id="minus" class="iconfont">&#xe61c;</button>
                                <input type="text" min="1" max="50" value="${val2.num}" name="" readonly>
                                <button id="add" class="iconfont">&#xe618;</button>
                            </div>
                        </div>
                        <div class="product-sumprice">
                            ¥<span>${val2.num*val1.price}</span>
                        </div>
                        <div class="iconfont product-del" id="delS">&#xe71c;
                           
                        </div>
                    </div>
            
            `
           
            }
          })
        })
        tbody.innerHTML = str;
    }
})